/* =========================================
   GIAO DIỆN FRONTEND (CHỐNG GÃY VỠ - ÉP 1 HÀNG)
   ========================================= */
#spa-eval-form-container, #spa-success-container {
    max-width: 700px;
    margin: 20px auto;
    /* Loại bỏ khoảng trống thừa 2 bên trên mobile */
    padding: 25px 10px; 
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    font-family: Arial, sans-serif;
    color: #333;
}

#spa-eval-form-container * {
    box-sizing: border-box;
}

#spa-eval-form-container .spa-title {
    color: #ff4d85 !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    margin-bottom: 5px;
    margin-top: 0;
    line-height: 1.2;
    text-align: center; 
}

#spa-eval-form-container .spa-subtitle {
    color: #666;
    font-style: italic;
    margin-bottom: 25px;
    font-size: 14px;
    text-align: center; 
}

/* Các hàng input */
#spa-eval-form-container .spa-form-row { margin-bottom: 15px; position: relative; }

/* Ép cứng không cho rớt hàng (nowrap) */
#spa-eval-form-container .spa-flex-row { 
    display: flex !important; 
    gap: 10px; 
    flex-wrap: nowrap !important; 
}
#spa-eval-form-container .spa-half { 
    flex: 1; 
    min-width: 0; /* Cho phép co nhỏ tối đa, không rớt hàng */
    position: relative; 
}


/* Ép buộc ô nhập chữ và ô chọn nhân viên CÙNG 1 CHIỀU CAO cố định */
#spa-eval-form-container input[type="text"], 
#spa-eval-form-container select {
    width: 100% !important; 
    height: 45px !important; /* Khóa cứng chiều cao bằng nhau */
    padding: 0 15px !important; /* Dùng padding ngang, để chữ tự động canh giữa theo chiều dọc */
    border: 1px solid #ccc !important; 
    border-radius: 8px !important; 
    font-size: 14px !important; 
    background: #fff;
    outline: none;
    box-shadow: none !important;
    box-sizing: border-box;
}
/* Riêng phần Ghi chú (Textarea) thì để tự do cho nó rộng ra */
#spa-eval-form-container textarea {
    width: 100% !important; 
    padding: 12px 15px !important; 
    border: 1px solid #ccc !important; 
    border-radius: 8px !important; 
    font-size: 14px !important; 
    background: #fff;
    outline: none;
    box-shadow: none !important;
    min-height: 80px;
    box-sizing: border-box;
    resize: vertical;
}

/* Chỉnh lại vị trí chữ (K) cho cân ngay giữa ô Giá */
#spa-eval-form-container .currency-label { 
    position: absolute; 
    right: 15px; 
    top: 50%; 
    transform: translateY(-50%); /* Bí kíp canh giữa tuyệt đối theo chiều dọc */
    color: #888; 
    font-weight: bold; 
    z-index: 10;
}



#spa-eval-form-container input[type="text"]:focus, 
#spa-eval-form-container textarea:focus,
#spa-eval-form-container select:focus { border-color: #ff4d85 !important; }

#spa-eval-form-container .currency-label { position: absolute; right: 10px; top: 23px; color: #888; font-weight: bold; z-index: 10;}

/* Gợi ý dịch vụ (Autocomplete) */
#spa-autocomplete-results {
    position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #ddd; 
    border-radius: 0 0 8px 8px; z-index: 999; box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    max-height: 250px; overflow-y: auto;
}
#spa-autocomplete-results .ac-item { padding: 12px 15px; cursor: pointer; display: flex; justify-content: space-between; border-bottom: 1px solid #f0f0f0; }
#spa-autocomplete-results .ac-item:hover { background: #fff0f5; }
#spa-autocomplete-results .ac-name { font-weight: bold; color: #333; }
#spa-autocomplete-results .ac-price { color: #ff4d85; font-weight: bold; }

#spa-eval-form-container .sdt-message { margin-top: 5px; font-size: 12px; font-style: italic; color: #d63638; display: none; }
#spa-eval-form-container .sdt-message.success { color: #2271b1; }

/* =========================================
   BẢNG MA TRẬN ĐÁNH GIÁ
   ========================================= */
#spa-eval-form-container .spa-matrix { 
    border: 1px solid #eee; border-radius: 8px; overflow: hidden; margin-bottom: 20px; background: #fff;
}

#spa-eval-form-container .matrix-header,
#spa-eval-form-container .matrix-row { 
    display: flex !important; flex-direction: row !important; text-align: center; border-bottom: 1px solid #eee;
    align-items: stretch; 
}
#spa-eval-form-container .matrix-header { background: #fafafa; }
#spa-eval-form-container .matrix-row:last-child { border-bottom: none; }

#spa-eval-form-container .col-title { 
    flex: 1.5; text-align: left; padding: 12px 10px; border-right: 1px solid #eee; 
    display: flex; flex-direction: column; justify-content: center;
}
#spa-eval-form-container .matrix-header .col-title {
    font-weight: 800; font-size: 14px; color: #333; text-transform: uppercase;
}
/* Co khoảng cách chữ Thái độ & (nói khẽ) */
#spa-eval-form-container .col-title strong { display:block; font-size:14px; color:#333; margin-bottom: 2px; line-height: 1.1; }
#spa-eval-form-container .col-title small { font-size:11px; color:#888; line-height: 1.1; display: block; }

#spa-eval-form-container .col-emoji, 
#spa-eval-form-container .col-radio { 
    flex: 1; display: flex !important; flex-direction: column !important; 
    justify-content: center; align-items: center; border-right: 1px solid #eee; padding: 10px 2px;
    gap: 3px; /* Ép Icon và Text sát nhau */
}
#spa-eval-form-container .col-emoji:last-child, 
#spa-eval-form-container .col-radio:last-child { 
    border-right: none;
}

#spa-eval-form-container .col-emoji span { font-size: 20px; line-height: 1; }
/* Ép chữ nhỏ lại và không cho rớt hàng */
#spa-eval-form-container .col-emoji small { 
    font-size: 10px; 
    font-weight: bold; 
    color: #555; 
    white-space: nowrap; 
    line-height: 1; 
    margin: 0;
}

#spa-eval-form-container .col-radio input[type="radio"] { 
    transform: scale(1.3); accent-color: #ff4d85; cursor: pointer; margin:0; width: auto !important;
}

/* Nút Submit */
#spa-eval-form-container .spa-btn-submit,
#spa-success-container .spa-btn-submit {
    width: 100%; background: #ff4d85 !important; color: #fff !important; font-weight: bold; font-size: 18px; 
    padding: 15px !important; border: none !important; border-radius: 8px; cursor: pointer; transition: 0.3s;
    text-transform: uppercase; display: block;
}
#spa-eval-form-container .spa-btn-submit:hover,
#spa-success-container .spa-btn-submit:hover { background: #e6396e !important; }